<html>
<head><meta charset="utf-8"><title>no debug output from rustc_mir? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html">no debug output from rustc_mir?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="181262293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181262293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181262293">(Nov 20 2019 at 23:49)</a>:</h4>
<p>I'm trying to do some debugging, but when I run <code>RUSTC_LOG=rustc_mir=debug rustc +stage1 test/ui/async-await/issues/issue-63388-1.rs</code> I don't get any debugging output</p>



<a name="181262317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181262317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181262317">(Nov 20 2019 at 23:49)</a>:</h4>
<p>If I run with <code>RUSTC_LOG=debug</code> I get plenty of output, but it is all from libsyntax_pos, librustc</p>



<a name="181262331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181262331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181262331">(Nov 20 2019 at 23:50)</a>:</h4>
<p>Am I doing something stupid?</p>



<a name="181262382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181262382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181262382">(Nov 20 2019 at 23:50)</a>:</h4>
<p>I made sure debug-assertions=true and I recompiled stage1 from clean</p>



<a name="181262666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181262666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181262666">(Nov 20 2019 at 23:55)</a>:</h4>
<p><span class="user-mention" data-user-id="198054">@mark-i-m</span> I think that should work ... hmmm, can you try <code>RUSTC_LOG=rustc_mir rustc +stage1 test/ui/async-await/issues/issue-63388-1.rs</code>?</p>



<a name="181262773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181262773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181262773">(Nov 20 2019 at 23:56)</a>:</h4>
<p>sorry, I did not understand if <code>RUSTC_LOG=debug ...</code> worked or not</p>



<a name="181262796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181262796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181262796">(Nov 20 2019 at 23:56)</a>:</h4>
<p>did you get debug info from <code>rustc_mir</code>? maybe search for that in the output?</p>



<a name="181264416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181264416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181264416">(Nov 21 2019 at 00:21)</a>:</h4>
<p>Oh, sorry, I see how that could be miss understood</p>



<a name="181264425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181264425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181264425">(Nov 21 2019 at 00:21)</a>:</h4>
<p>RUSTC_LOG=rustc_mir gives nothing</p>



<a name="181264467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181264467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181264467">(Nov 21 2019 at 00:22)</a>:</h4>
<p>RUSTC_LOG=debug gives _no_ output from rustc_mir</p>



<a name="181264610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181264610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181264610">(Nov 21 2019 at 00:24)</a>:</h4>
<p>It also doesn't work with stage 2</p>



<a name="181299601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181299601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181299601">(Nov 21 2019 at 12:32)</a>:</h4>
<p><span class="user-mention" data-user-id="198054">@mark-i-m</span> I was checking a bit the code because I was not sure how are logs in general enabled but it shouldn't be related to <code>debug-assertions</code> or anything like that</p>



<a name="181299628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181299628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181299628">(Nov 21 2019 at 12:32)</a>:</h4>
<p>my understanding is that it just uses the env variable to initialize the loggers in the level you use on the env variable and that's all</p>



<a name="181299656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181299656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181299656">(Nov 21 2019 at 12:33)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/2cad8bb659066b42fc518c95def384956126bd3f/src/librustc_driver/lib.rs#L1246" target="_blank" title="https://github.com/rust-lang/rust/blob/2cad8bb659066b42fc518c95def384956126bd3f/src/librustc_driver/lib.rs#L1246">https://github.com/rust-lang/rust/blob/2cad8bb659066b42fc518c95def384956126bd3f/src/librustc_driver/lib.rs#L1246</a></p>



<a name="181299741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181299741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181299741">(Nov 21 2019 at 12:34)</a>:</h4>
<p>debug-assertions are about turning on debug-assert in non optimized builds</p>



<a name="181299752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181299752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181299752">(Nov 21 2019 at 12:34)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/2cad8bb659066b42fc518c95def384956126bd3f/src/libcore/macros/mod.rs#L142-L217" target="_blank" title="https://github.com/rust-lang/rust/blob/2cad8bb659066b42fc518c95def384956126bd3f/src/libcore/macros/mod.rs#L142-L217">https://github.com/rust-lang/rust/blob/2cad8bb659066b42fc518c95def384956126bd3f/src/libcore/macros/mod.rs#L142-L217</a></p>



<a name="181299787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181299787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181299787">(Nov 21 2019 at 12:35)</a>:</h4>
<p>/cc <span class="user-mention" data-user-id="116122">@simulacrum</span></p>



<a name="181300926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181300926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181300926">(Nov 21 2019 at 12:49)</a>:</h4>
<p>if debug-asserts aren't on you can't get more verbose logs than just info</p>



<a name="181301028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181301028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181301028">(Nov 21 2019 at 12:50)</a>:</h4>
<p>debug! logs are gated behind debug-assert = true so that they're completely compiled out in dist builds</p>



<a name="181301600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181301600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181301600">(Nov 21 2019 at 12:59)</a>:</h4>
<p>I see, makes sense, couldn't find how that happens on the code though</p>



<a name="181327856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181327856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181327856">(Nov 21 2019 at 17:36)</a>:</h4>
<p>Yeah, I wanted debug! messages, so I turned on debug-assert</p>



<a name="181327920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181327920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181327920">(Nov 21 2019 at 17:37)</a>:</h4>
<p>It turned out that 1) I needed to pass <code>--edition 2018</code> to the compiler, and 2) I needed to add <code>#![feature(nll)]</code> to the test case</p>



<a name="181327946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181327946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181327946">(Nov 21 2019 at 17:37)</a>:</h4>
<p>I was under the impression that the nll borrow checker was always running, so this is still a bit perplexing to me...</p>



<a name="181327978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181327978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181327978">(Nov 21 2019 at 17:37)</a>:</h4>
<p>In particular, if nll is on by default, what does the feature gate do? And what does edition 2015 do differently?</p>



<a name="181328584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181328584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181328584">(Nov 21 2019 at 17:44)</a>:</h4>
<p>probably related to the migrate-mode</p>



<a name="181328635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/no%20debug%20output%20from%20rustc_mir%3F/near/181328635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/no.20debug.20output.20from.20rustc_mir.3F.html#181328635">(Nov 21 2019 at 17:45)</a>:</h4>
<p>while the feature gate turns on "full NLLs"</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>